﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Provenance.Domain.DeepProcess;
using Provenance.ErrorCount;
using Provenance.Write.Api.Application.Command.DeepProcess;

namespace Provenance.Write.Api.Controllers
{
    [Route("api/writedeepprocess/[controller]/[action]")]
    [ApiController]
    public class DeepProcessController : ControllerBase
    {
        private readonly IMediator _mediator;
        public DeepProcessController(IMediator mediator)
        {
            _mediator = mediator;
        }

        [HttpPut]
        public async Task<ApiResult> UpDeepProcessInfo(UpDeepProcessInfoCommand param)
        {
            return await _mediator.Send(param);
        }
        [HttpPut]
        public async Task<ApiResult> UpRowMaterial(UpRowMaterialCommand param)
        {
            return await _mediator.Send(param);
        }
        [HttpPut]
        public async Task<ApiResult> UpAuxiliaryMaterial(UpAuxiliaryMaterialCommand param)
        {
            return await _mediator.Send(param);
        }
        [HttpPut]
        public async Task<ApiResult> UpAdditive(UpAdditiveCommand param)
        {
            return await _mediator.Send(param);
        }
        [HttpPut]
        public async Task<ApiResult> UpPackagingMaterial(UpPackagingMaterialCommand param)
        {
            return await _mediator.Send(param);
        }
        [HttpPut]
        public async Task<ApiResult> UpDeepProcessEnterprise(UpDeepProcessEnterpriseCommand param)
        {
            return await _mediator.Send(param);
        }


    }
}
